<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--框架必需start-->
<script type="text/javascript" src="../js/jquery-1.4.js"></script>
<script type="text/javascript" src="../js/framework.js"></script>
<link href="../css/import_basic.css" rel="stylesheet" type="text/css"/>
<link  rel="stylesheet" type="text/css" id="skin"/>
<!--框架必需end-->

<link rel="stylesheet" href="css/jquery-ui.css" />

<!--多选下拉框start-->
<script type="text/javascript" src="../js/form/multiselect.js"></script>
<!--多选下拉框end-->

<!--表单验证脚本start-->
	<script src="../js/form/validationEngine-cn.js" type="text/javascript"></script>
	<script src="../js/form/validationEngine.js" type="text/javascript"></script>
<!--表单验证脚本end-->


<script type="text/javascript">

$(function(){
	$("#button_1").toggle(function(){
		$(this).val("取消");
		$("#iframe_1").show(1000);
	},
	function(){
		$(this).val("拍照");
		$("#iframe_1").hide(1000);
	});
});

$(function(){
	$("#button_2").toggle(function(){
		$(this).val("取消");
		$("#table_1").show(1000);
	},
	function(){
		$(this).val("打印");
		$("#table_1").hide(1000);
	});
});

$(function(){
	$("#button_3").toggle(function(){
		$(this).val("取消");
		$("#table_2").show(1000);
	},
	function(){
		$(this).val("扫描");
		$("#table_2").hide(1000);
	});
});

function getString(){

	$("#td_1,#tds_1").text($("#tex_1").val());
	$("#td_2,#tds_2").text($("#tex_2").val());
	var vehicleId=$("#td_3,#tds_3").text($("#sel_1").val()+$("#tex_3").val());
	$("#td_4,#tds_4").text($("#tex_4").val());
	$("#td_5,#tds_5").text($("#tex_5").val());
}


function sms() {
	var a = document.getElementById('avisitorName').value;
	var b = document.getElementById('avisitorTel').value;
	var c = document.getElementById('extra').value;
	var mm = "您有新的访客\n访客姓名:" + a + "\n访客电话:" + b + "\n其他信息:" + c;
	document.verifyform["mm"].value = mm;
	var to = document.getElementById('toto').value;

	$.post("http://hdrobot.sinaapp.com/sendone.php",{"mm":mm,"toto":to});
	//document.smsform.submit();
}

function confirm() {
	document.getElementById('army_carform').submit();
	document.army_carform.submit();
}




</script>

<style>

.area{
	width:100px;
	Height:200px;
}

</style>

</head>
<body>
<div class="position">
	<div class="center">
	<div class="left">
	<div class="right">
		<span>当前位置：军车进入</span>
	</div>
	</div>
	</div>
</div>
<div id="scrollContent">
	<div class="box1" panelWidth="800">
	<fieldset>
		<legend>短信验证</legend>
		<form action=""  name="verifyform" method="post">
		<table class="tableStyle" transMode="true" footer="normal">
				<tr>
				<td width="13%">被访者电话：</td>
				<td width="40%">
				<input type="text" name="toto" id="toto" class=" validate[required,custom[mobilephone]]"/><span class="star">*</span></td>
				<td width="10%">访者姓名：</td>
				<td>
				<input type="text" name="visitorName" id="avisitorName"/>
				</td>
			</tr>
			<tr>
				<td width="10%">访者电话：</td>
				<td>
				<input type="text" name="visitorTel" id="avisitorTel" class=" validate[required,custom[mobilephone]]"/><span class="star">*</span>
				</td>
				<td width="10%">附加信息：</td>
				<td>
				<input type="text" name="extra" id="extra"/>
				</td>
				<td>
				<input type="hidden" id="mm" value="hello" name="mm" />
				</td>
			</tr>
			<tr>
			<td align="right"> </td>
				<td align="right">
				<input type="button" value="验证" onclick="sms()"/> &nbsp;&nbsp;
				<input type="reset" value="重置"/></td>

				<td align="left"></td>
				<td></td>
			</tr>
			<!--
			<tr>
				<td width="10%">曾用名：</td>
				<td><input type="text"/></td>
				<td>婚姻状况：</td>
				<td><label for="radio-3">已婚</label><input type="radio" id="radio-3" name="ra2" value="radio-3" />
					<label for="radio-4">未婚</label><input type="radio" id="radio-4" name="ra2" value="radio-4"/>
				</td>
			</tr>
			<tr>
				<td>出生日期：</td>
				<td><input type="text" class="date"/></td>
				<td>爱好：</td>
				<td><label for="checkbox-1" >唱歌</label><input type="checkbox" id="checkbox-1" value="选项1"/>
					<label for="checkbox-2">跳舞</label><input type="checkbox" id="checkbox-2" value="选项2" />
				</td>
			</tr>
			 -->
		</table>
		</form>
	</fieldset>

	<fieldset>
		<legend>合法人信息记录</legend>
		<form action="mvehicleVisit!mvehicleIn" name="army_carform" id="army_carform">
		<table class="tableStyle" transMode="true" footer="normal">
			<tr>
				<td width="10%">驾驶员姓名：</td>
				<td width="40%">
					<input type="text"  id="tex_1" name="visitor.visitorName"/>
				</td>
				<td width="10%">电话号码：</td>
				<td>
					<input type="text" id="tex_2" name="visitor.visitorTel" class=" validate[required,custom[mobilephone]]"/><span class="star">*</span>
				</td>
			</tr>
			<tr>
				<td>车牌号：</td>
				<td>
				<select id="sel_1" name="pre_vehicleId" class="default" style="width:40px;" >
					<option value="京">京</option>
					<option value="军">军</option>
					<option value="南">南</option>
					<option value="广">广</option>
					<option value="济">济</option>
					<option value="沈">沈</option>
					<option value="兰">兰</option>
					<option value="成">成</option>
					<option value="海">海</option>
					<option value="空">空</option>
				</select>
				<input type="text" id="tex_3" name="su_vehicleId"/>
				</td>
				<td>车类型：</td>
				<td>
				<input type="text" id="tex_4" name="vehicle.type"/>
				</td>
			</tr>
			<tr>
				<td>身份证号：</td>
				<td>
				<input type="text" id="tex_5" name="visitor.visitorId"/>
				<input type="hidden" id="tex_mvt" name="mliVehVisitor.visitorId"/>
				</td>
				<td></td>
				<td>

				</td>
			</tr>
			<tr>
				<td>照片：</td>
				<td>
				<iframe id="iframe_1" src="../images/3.jpg" style="display:none" class=area></iframe>
				</td>
				<td></td>
				<td>
				<input type="button" value="拍照" id="button_1"/>
				</td>
			</tr>
		</table>
		</form>
	</fieldset>


	<fieldset>
		<legend>打印访客单</legend>
		<table class="tableStyle" transMode="true" footer="normal" id="table_1" style="display:none" >
			<tr>
				<td width="15%">姓名：</td>
				<td width="35%" id="td_1">

				</td>
				<td width="10%">电话号码：</td>
				<td id="td_2">

				</td>
			</tr>
			<tr>
				<td>车牌号：</td>
				<td id="td_3">

				</td>
				<td>车类型：</td>
				<td id="td_4">

				</td>
			</tr>
			<tr>
				<td>身份证号：</td>
				<td id="td_5">

				</td>
				<td></td>
				<td>

				</td>
			</tr>
		</table>
		<center><input type="button" value="打印" id="button_2" onclick="getString()"/></center>
	</fieldset>


	<fieldset>
		<legend>验证访客单</legend>
		<table class="tableStyle" transMode="true" footer="normal" id="table_2" style="display:none" >
			<tr>
				<td width="10%">姓名：</td>
				<td width="40%" id="tds_1">

				</td>
				<td width="10%">电话号码：</td>
				<td id="tds_2">

				</td>
			</tr>
			<tr>
				<td>车牌号：</td>
				<td id="tds_3">

				</td>
				<td>车类型：</td>
				<td id="tds_4">

				</td>
			</tr>
			<tr>
				<td>身份证号：</td>
				<td id="tds_5">

				</td>
				<td></td>
				<td>

				</td>
			</tr>
		</table>
		<center><input type="button" value="扫描" id="button_3"/></center>
	</fieldset>
	<!--
	<fieldset>
		<legend>访客单验证</legend>
		<table class="tableStyle" transMode="true" footer="normal" id="table_1" style="display:none">
			<tr>
				<td width="10%">邮政编码：</td><td width="40%"><input type="text"/></td>
				<td width="10%">上传附件：</td><td><input type="file"/></td>
			</tr>
			<tr>
				<td>固定电话：</td><td><input type="text"/></td>

				<td>上传文档：</td><td><input type="file"/></td>
			</tr>
			<tr>
				<td>备注：</td>
				<td colspan="3">
					<span class="float_left">
					<textarea style="width:400px;"></textarea>
					</span>
					<span class="img_light" style="height:80px;" title="限制在200字以内"></span>
				</td>
			</tr>
		</table>
	</fieldset>
	 -->
	<div class="padding_top10">
		<table class="tableStyle" transMode="true">
			<tr>
				<td colspan="4">
					<input type="button" value=" 提 交 " onclick="confirm()"/>
					<input type="reset" value=" 重 置 "/>
				</td>
			</tr>
		</table>
	</div>
	</div>
</div>
</body>
</html>